home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / idl / nsIJAR.idl < prev    next >
Text File  |  2006-05-08  |  4KB  |  103 lines

  1. /* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
  2.  *
  3.  * ***** BEGIN LICENSE BLOCK *****
  4.  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
  5.  *
  6.  * The contents of this file are subject to the Mozilla Public License Version
  7.  * 1.1 (the "License"); you may not use this file except in compliance with
  8.  * the License. You may obtain a copy of the License at
  9.  * http://www.mozilla.org/MPL/
  10.  *
  11.  * Software distributed under the License is distributed on an "AS IS" basis,
  12.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  13.  * for the specific language governing rights and limitations under the
  14.  * License.
  15.  *
  16.  * The Original Code is Mozilla Communicator client code, released
  17.  * March 31, 1998.
  18.  *
  19.  * The Initial Developer of the Original Code is
  20.  * Netscape Communications Corporation.
  21.  * Portions created by the Initial Developer are Copyright (C) 1998
  22.  * the Initial Developer. All Rights Reserved.
  23.  *
  24.  * Contributor(s):
  25.  *   Daniel Veditz <dveditz@netscape.com>
  26.  *   Don Bragg <dbragg@netscape.com>
  27.  *   Samir Gehani <sgehani@netscape.com>
  28.  *   Mitch Stoltz <mstoltz@netscape.com>
  29.  *
  30.  * Alternatively, the contents of this file may be used under the terms of
  31.  * either the GNU General Public License Version 2 or later (the "GPL"), or
  32.  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  33.  * in which case the provisions of the GPL or the LGPL are applicable instead
  34.  * of those above. If you wish to allow use of your version of this file only
  35.  * under the terms of either the GPL or the LGPL, and not to allow others to
  36.  * use your version of this file under the terms of the MPL, indicate your
  37.  * decision by deleting the provisions above and replace them with the notice
  38.  * and other provisions required by the GPL or the LGPL. If you do not delete
  39.  * the provisions above, a recipient may use your version of this file under
  40.  * the terms of any one of the MPL, the GPL or the LGPL.
  41.  *
  42.  * ***** END LICENSE BLOCK ***** */
  43.  
  44. #include "nsISupports.idl"
  45.  
  46. %{C++
  47. #define NS_JAR_CID                    \
  48. { /* 04501DB3-0409-11d3-BCF8-00805F0E1353*/  \
  49.     0x04501DB3,                              \
  50.     0x0409,                                  \
  51.     0x11d3,                                  \
  52.     {0xbc, 0xf8, 0x00, 0x80, 0x5f, 0x0e, 0x13, 0x53} \
  53. }
  54.  
  55. #define NS_JAR_CONTRACTID \
  56.   "@mozilla.org/libjar;1"
  57.  
  58. #define NS_IJARFactory_IID                    \
  59. { /* 04501DB4-0409-11d3-BCF8-00805F0E1353 */         \
  60.     0x04501DB4,                                      \
  61.     0x0409,                                          \
  62.     0x11d3,                                          \
  63.     {0xbc, 0xf8, 0x00, 0x80, 0x5f, 0x0e, 0x13, 0x53} \
  64. }
  65.  
  66. #define NS_JARFactory_CID                 \
  67. { /* 04501DB5-0409-11d3-BCF8-00805F0E1353 */         \
  68.     0x04501DB5,                                      \
  69.     0x0409,                                          \
  70.     0x11d3,                                          \
  71.     {0xbc, 0xf8, 0x00, 0x80, 0x5f, 0x0e, 0x13, 0x53} \
  72. }
  73. %}
  74.  
  75. interface nsIPrincipal;
  76.  
  77. [uuid(04501DB2-0409-11d3-BCF8-00805F0E1353)]
  78. interface nsIJAR : nsISupports
  79. {
  80.  
  81.     const short NOT_SIGNED         = 0;
  82.     const short VALID              = 1;
  83.     const short INVALID_SIG        = 2;
  84.     const short INVALID_UNKNOWN_CA = 3;
  85.     const short INVALID_MANIFEST   = 4;
  86.     const short INVALID_ENTRY      = 5;
  87.     const short NO_MANIFEST        = 6;
  88.  
  89.      /**
  90.      * Returns an object describing the entity which signed 
  91.      * an entry. parseManifest must be called first. If aEntryName is an
  92.      * entry in the jar, getInputStream must be called after parseManifest.
  93.      * If aEntryName is an external file which has meta-information 
  94.      * stored in the jar, verifyExternalFile (not yet implemented) must 
  95.      * be called before getPrincipal.
  96.      */
  97.     void getCertificatePrincipal(in string aEntryName, out nsIPrincipal aPrincipal);   
  98.     
  99.     readonly attribute PRUint32 manifestEntriesCount;
  100.  
  101. };
  102.  
  103.